#ifndef QTLINESPRITE_H
#define QTLINESPRITE_H

#include "QtSprite.h"

class QtLineSprite: public QtSprite
{
public:
	QtLineSprite(QtSprite *parent = 0);
	~QtLineSprite();

	void SetLine(const QPointF& begin, const QPointF& end);
	void SetColor(const QColor& newColor);
	void SetLineWidth(unsigned int width);

protected:
	void AlphaUpdated(qreal alpha);
	QRectF boundingRect() const;
	QPainterPath shape() const;
	void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);

private:
	QGraphicsLineItem *lineItem;
};

#endif //QTLINESPRITE_H